Version 5.1 (code cleaned)