added optional func