fixing loggin thing in model