fully inlined the put functions