added changes suggested by frank