cleaned up update. functionality not changed