handling 0 record situation