main script already working with basic funcitonality, needs testing