works but want to make it better