new log function added. included json model for testing.