Chaned backtoapp to js