tweaking plushcap main code