resolved bug in button and extended example.m