merging with kingpiko : back to old pattern because tests not passed