got rid of unnecessary function