a rake task and some adjustments to operation