Seperate functions, remove overflow and small