refactor 
extract interfaces