re-factoring: removed unused functions