first working version with new format