put and functions almost done