add date filtering
some cleanup