initial implementation, works w/ rust 0.10