Implemented All the Functions