adding check for post variable