fix bug and add extensions for array