fixed raven problem
refactoring
rewriting raven