test new script
cleaned up the code a bit