added lots of functionallity