implemented logic on client

Signed-off-by: Fons <lord.fontana@gmail.com>