updated code to use janus_allocate and janus_free