added core package. refactored