manual and automatic scanning