added some convenient UI functions.