small changes, seems to work!!