added new version that works