added apache math