Re-implemented some of the functions for better usage