fixed for assignment requirements (hold b, m for test cases)
initial write