changed from gersteinlab's funseq program