required changes, removed unneeded if