Changed composite code to work with new database