stp: initial implementation