add user-defined example; figure out how to calculate position from frequency