Amended code
