Fixed code with hanging method signature