Change the functionality and trun it into API style