fixed back and forward and added flash alert
edited error messages