Preliminary full implemenation