added functions to top_rep