added flat lib