revise functions for pos and term