optimaze image pass 1