modified for rake tasks