new functions, fixes