changed some format stuff, added some database stuff