fixed bugs- should work now