paramcount simplification by @jesyspa