added
added first pass at script and frames
reduced some code