changed logical definitions
fixed typo in declarations