update to new API and improve folder structure