added status bar and some more logic