check arguments before using them, stupid