Added library funtions