general libs, merge from dev