a little removal of redundant code