added case checks