added runprogram method