fixed bugs - all work