added not refactored code