moved fun functionality to a better location

and also added more functionality to that functionality