abstract ui functions to their own module