added ability to change length and added getProgress