some additional comments and a new var_dump function for debugging