few changes in methods, refactored