preparing code for adding database