dunno what I did. Got things from db and such
fixed sql)