a lot cleaner code