Refactor to use getX instead of returnX