Added code for capturing pictures (not functional yet)