fixed inplementation