Renamed api to use first and last instead of front and end