some cleaner code