now working lab. fix bugs