implemented suggestions from inspector