moving the navigation to a function
finding a subject in the database