fixed bugs - ready to test tomorrow