fine tuning on some library functions