added conditional code around applicatoin deadline