refactor to interface approach