small refactoring (academic bullshit :P)