manged to finally make it work using persistent databse