minimized code a bit.