emas implementation
refactoring
bugfix
release 0.5