fixed various steps mentioned in previous comment. #54