got the basic script to work