add comments
add try/catch
merge