almost finished with dictionary functions