added more comments for documentation