much refactor very clean