Most up to date code, not getting data from database though