finished coding orport. needs testing