fixed querry's and managment