unify function and variable names
adjust data size dynamically