Implemented various functions