added pair?, fixed begin enviornments, fixed implicit begin