updated thumb code