made function to tie shit together