added (commented out) code to benchmark matrices creation
added training functionality and a (commented out) slow test
small performance improvement