adding singleton and ui part