refactor and adding private keywokr, needs fixing