added new root path and added flash messages