note that using size_t is needed whenever dealing with sizes: http://ewontfix.com/9/