first refactor :)