add function details including constructor and prototype toString() method