implemented changes suggested by Frank