remove library() usage in the function