some correction, not fully working