added database stuff and changed text to highlight errors