made more c++ like