put function working