edited assert and kept names of methods and variables consistent