remove unused code - old version