refacted for simple UI