naive version
overload []