Use factor variables properly