Edited funcion database test