done pop method for array