Converted functions to methods