extended and debugged WLM