updated with suggestions from the forum