made some fixes to my previous commit