Edited code style of lab 4