fallback offsets function,split main in ncurses and debug