Data type casting moved to class