updated code appointment module