started fixing beta-reduction