first cam controlling function
removed unused imports
capture preview function
capture preview function - javadoc