use sizeof instead of constant