refactor code for poc