Use library functions instead of written by myself