refactored stuff but raspi still image capturing is not finished,