cleaner code
update tests from core