adding before client scripts implementation