applied lastWork with transaction