added Beale's function