work logic