two working versions