removed doubled code