began port of DB code to TMM app