adding prepared statment function with parameters array