extract a func