made changes requested by elbrogrammer