changed AnyObject to Any; removed unnecessary code