fixing initial bugs - should be stable now