encoder and decoder for position_t added to api.

#46 
what a lazy excuse for a test case