added array powers
fixed mode