An attemp to make this cleaner