Fixed  implementation