hopefully more readable and still works