add image capture function