Added assertion and indention