require not working as expected