- implemented mysqli to replace mysql functions