changed according to Cory's comments (changed comments, removed deprecated methods)