finding better way to do it