removed some code specific to my implementation