rewrited code and added quasi console to app