move private methods
add array validator