updated code and removed duplicate file