adding error checking and navigational menu