small bug fix
small tweaks
new function