clean up & new functions