updated code for access-2