Take scan for compact from HW3.