removed shitloads of errors. fixed up member detection