call expires.in with max age
refactor everything depender related in its own method