refactoring - separated in two projects (core and samples)