little cleanup of code