fixing full implementation