finshed adfly code