refactoring based on latest eve project