add funcions, tests