removing magic strings
refactoring code