closer to final working version