Refactoring

WARNING code wont compile