Updated with more functionality