cleaning up script after solving issue #15