fixed fatal error; slimmed things down