moved code around, added a timeout-able acquire
updated some comments