starting work on the start scan function