refactoring...................@!$@#$#@