added new options, improved overall functionality