fixed Lifecycle
tests almost done