added user interface (most of it)