Version 3

Logic for limits added - works for day limits only in this version
(first add limits for days)