some cleaner and more correct code