made big fixes to the application