bug fix
&
richer functions