fixed bugs and changed db to mysql
merged