fully developed so far, added db connection, terms class and ajax call