editted some code to restore functionality