improved efficiency
new functions