1st Version of refactor