array subscript seems to be working...
for-loop fixes
refactored package structure