commted method, fixing errors