added function to database to split string