fixing callbacks (still in the process of doing this)