updated code for testing