addition of new logic (working copy)