base ui logic