IssueID #28: get rid of dangerous functions
fix merging