almost every functionality added, now only fine tuning remains