working lab1 version