implement mathing page