cleaned up script