adding code and database