working version of lab 3