added resize method & example