cleaned up image addition codes