refactoring..a bit =)