changed the impl a bit