rewrite the mobile template