more comments
produces reference check half implemented