much better way to do