Added method prompt and removed for statement.