add auto resize sample