add optional classname support. Closes #1