using getter overloader for toObject() method