refactor classes to sample package