formate code to drupal style
add options support