changed the argument to false for getValue , reformated else statement