converted web app to handlers, added mutex code