* added threshold functionality still have to fix the background bleeding. not sure why it happens. needs some revisites.