finally..ugh..got some of the main functionality working