v0.1-1 added check if  array is empty or not