Code with working block on main application console