added and tweaked some stuff