make loosepointfunc take model
py3 fix