fixed syntax, added free impl