refactoring
added maxFramesToRecord(int)