utils methods fixed for correctness