adding idempotency for Sub-cat-type and modifying code for adding the time-stamp