remove requires
added confine windows os
add require within method and handle exception