hrmmmm... need to refactor.