refactoring
add ArrayObject
add balance check