refactor

better use of proto and this...