removed dublicate function