added selector to prevent nil class error in index