testing and fixing the ok function