rewrite for WAMP