Improving class functions