refactor hard code