client old code cleaned