updated ex4 work