correcting style, adding convenience functions