arrange code
comments, error handling