refactor to dehardcodding something