Made more functional