Added image capture code, not sure if it is working