creating expiration date calculation on server side