move WML [modify_side] implementation to lua