inserted code that database function can be called