fixed method calling and printing non void functions