improve the method implementation