minor edits, appears to be working