Edited to reflect code changes