Adding implementation for the functions