Added some functionality in classes methods