updates, cleaner code