refactored to be more concise; removed unneeded file