and remove unused funtion