just polishing the code