fix wrong subroutine
fix predata usage