use construct for function evaluation
fix bugs