added old code to be used for validation