added: variable checks and converting booleans