better more valid code